#include "QuickSort.h"
#include <vector>
#include <ctime>

using namespace std;
//begin
//why I cant use PINYIN as input in the emacs(GUI version)?too bad
int main(int argc,char* argv[]){
  srand(time(0));
  vector<int> sample;
  int num,t;
  //set the clock,and set a Vector to make random inports,if you like you can actually use other type instead of Int
  cout<<"print a number as the size of input"<<endl;
    cin>>num;
    cout<<"now enter a int as the biggest number in the sample";
    cin>>t;
    for(int i = 0;i<num;i++)
  {
    int k = rand()%t;
      sample.push_back(k);
  }

  //run the QS and print the time cost
  clock_t start,finish;
  start = clock();
  quicksort_m(sample);
  finish = clock();
  cout<<"cost1"<<(finish-start)<<endl;

  start = clock();
  quicksort_r(sample);
  finish = clock();
  cout<<"cost2"<<(finish - start)<<endl;
  return 0 ;
}
